package com.d0317;

public class CreaateThreadByExtends extends Thread {
    private boolean isRunning = true;
    @Override
    public void run() {
        while (isRunning) {
            System.out.println("正在运行");
        }
    }

    public void stop1(){
        isRunning = false;
    }

    public static void main(String[] args) {
        CreaateThreadByExtends creaateThreadByExtends = new CreaateThreadByExtends();
        creaateThreadByExtends.start();//就绪状态

    }
}
